<html>

<head>
<title>Calendar demo</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../js/Calendar.js"></script>
</head>

<body>

<div id="frame">
</div>

<script type="text/javascript">

var renderer = {
	firstDay: 1, 
	orientation: 1, 
	renderDate: function(input, index, calendar)
	{
		input = input || '&nbsp;';
		return '<td>' + input + '</td>';
	},
	renderWeek: function(input, index, calendar)
	{
		return '<td class="week">' + weekList[input] + '</td>';
	},
	renderMonth: function(input, calendar)
	{
		return '<caption>' + monthList[input] + ' - ' + calendar.year + '</caption>\n';
	},
	renderRow: function(input, calendar)
	{
		return '<tr>' + input.join('') + '</tr>\n';
	},
	renderCalendar: function(input, calendar)
	{
		return '<table class="calendar">' + input.join('') + '</table>';
	}
};

var weekList = 'Sun Mon Tue Wed Thu Fri Sat'.split(/\s+/);
var monthList = 'January February March April May June July August September October November December'.split(/\s+/);

var cal = new Calendar();

// Render vertically and with Monday as the first day of a week
var date = new Date();
var result = cal.render(date, renderer);

document.getElementById('frame').innerHTML = result;

</script>

</body>
</html>